﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DAL_Class;

namespace NLLSite.Administrator.UserControl
{
    public partial class AddNewAuthor : System.Web.UI.UserControl
    {
        
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnThem_Click(object sender, EventArgs e)
        {
            TacGia tg = new TacGia();
            Author au = new Author();

            au.AuthorName = txtAuthor.Text;
            au.Description = CKEditor1.Text;

            Label1.Text = tg.AddNewAuthor(au);
            txtAuthor.Text = string.Empty;
            CKEditor1.Text = string.Empty;
            Response.Redirect("Quanlytacgia.aspx");
        }
    }
}